﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SistemaControleOrcamentario
{
    public partial class RelContaSaldo : Form
    {
        public RelContaSaldo()
        {
            InitializeComponent();
        }

        private void RelContaSaldo_Load(object sender, EventArgs e)
        {

            List<DataLayer.Model.Conta.ContaSaldo> list = DataLayer.Model.Conta.GetAllSaldo();
            txtTotal.Text = list.Sum(p => p.Saldo).ToString("c");

            dgContaSaldo.DataSource = list;
        }
    }
}
